<?xml version="1.0" encoding="UTF-8"?>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="./css/template.css" />
        <link type="text/css" rel="stylesheet" href="./css/SyntaxHighlighter.css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>Jini</title>
        <script language="javascript" src="./js/shInit.js" />
        <script language="javascript" src="./js/shCore.js" />
        <script language="javascript" src="./js/shBrushCpp.js" />
        <script language="javascript" src="./js/shBrushCSharp.js" />
        <script language="javascript" src="./js/shBrushCss.js" />
        <script language="javascript" src="./js/shBrushDelphi.js" />
        <script language="javascript" src="./js/shBrushJava.js" />
        <script language="javascript" src="./js/shBrushJScript.js" />
        <script language="javascript" src="./js/shBrushPhp.js" />
        <script language="javascript" src="./js/shBrushPython.js" />
        <script language="javascript" src="./js/shBrushRuby.js" />
        <script language="javascript" src="./js/shBrushSql.js" />
        <script language="javascript" src="./js/shBrushVb.js" />
        <script language="javascript" src="./js/shBrushXml.js" />
        <keywords>Jini,UPnP,RMI,Jini(TM) Technology Starter Kit</keywords>
        <author>Brice Gaillard</author>
    </head>
    <body>
        <div class="chapter">
            <h2>1 - Introduction</h2>
            <p>
                <i>Jini</i>
                is a technolgy developed by
                <i>Sun Microsystems</i>
                for creating a unique network of devices, applications and periphals, easy to manage, progressive which can be distributed and independent of the operating system and protocols used.
				All this is one of majors 
                <i>Jini</i>
                goals: provide access to service, for a user belonging to a group authorized, by an object regardless of where he is in the network.
				Another advantage of 
                <i>Jini</i>
                is to provide a distributed network, easy to administer and dynamically changing because each device attached to
                <i>Jini</i>
                network has interfaces to use it.
				It is often compared to Microsoft UpnP (Universal Plug & Play), Salutation or other protocol supported by an important consortium including Adobe, Cisco, HP, IBM, and many others.

            </p>
            <div class="subChapter">
                <h3>1.1 - Presentation</h3>
                <p>
                    <i>Jini</i>
                    technology provides an architecture allowing the periphericals grouping in a distributed environnement for offer their services to users or other devices. Devices, which can be applications, peripheral or both, are grouped in services federation and offer their service through their interface.
					Each device, connected to
                    <i>Jini</i>
                    network, provides his interface to ensure reliability and compatibility, and propagates through network thanks to RMI protocol (Remote Method Invocation). Objects move between virtual machines - therefore all devices, capable to integrate a JVM (Java Virtual Machin) and a processor for calculations, can be part of a
                    <i>Jini</i>
                    system. There is an exception: for devices which cannot have JVM or processor, they will be controlled by another device. For this reason, we can found printers, software, cellular, or even coffee or washing machine among devices. We can also use
                    <i>Jini</i>
                    to control a home automation network without any computer.
                    <i>Jini</i>
                    system consumes a lot of power processor, considering that the bandwidth is very high.
                </p>
            </div>
        </div>
        <div class="chapter">
            <h2>
                2 - 
                <i>Jini</i>
				Architecture
            </h2>
            <p>                
                <i>Jini</i>
                architecture is a specification from 
                <i>Sun Microsystems</i>
                , for creating a unique system in a distributed environment.
                <i>Jini</i>
                technology provides a mean to discover, localize, and use securly and optimised services.
            </p>
            <div class="subChapter">
                <h3>2.1 - Main concepts</h3>
                <h4>2.1.1 - Service</h4>
                <p>
                    Service is the most important concept of
                    <i>Jini</i>
                    architecture. It refers at the same time to an entity and to the function proposed. It’s a generic term because a peripherical can provides multiple services and services can be provided by many periphericals and/or software. 
					Indeed, a service represents the treatment that an entity purposes for its clients. A client can be a user, software or another service. For example, a service can be: “print for a printer” or “store data for a hard disk”. A camera can provide the service “record video” but also “take a photo”.
                </p>
                <h4>2.1.2 - Lookup</h4>
                <p>
                    Service Lookup is a significant part of
                    <i>Jini</i>
                    system. 
					It’s the main link beetwen clients and services. It looks like to a proxy where all services will register and transmit their interfaces to define how to communicate with the client. It also allows clients to find services offered by Jini
                    <i>Jini</i>
                    system, and to know which one corresponds most closely to the expected treatment.
                </p>
                <h4>2.1.3 - Leasing</h4>
                <p>
					Access to services is limited by a lease manager which offers services to clients for limited time. Each lease guarantee service access to the client and must be renewed before the end of the lease time, whereas the service link will be cutted. 
					This mechanism has been concepted to remedy the problem which may block the network. Indeed, suppose that a client wait the end of the treatment for continue its work. If the service disconnects from the system without warning, the client risks waiting forever, and overwhelming the network. Leasing has resolved this effect.
                <h4>2.1.4 - Transaction</h4>
                <p>
                    <i>Jini</i>
                    architecture manages transactions support. 
					Call of services by a client can be encapsulated in a transaction and meet all its obligations. 
                </p>
                <h4>2.1.5 - Security</h4>
                <p>
                    Security in
                    <i>Jini</i>
                    system is essentially based on two fundamentals concepts: a main access and an access control list. A user reaches to a service by a main access and this service can access to others services through the access control list of the user.
                </p>
                <h4>2.1.6 - Events</h4>
                <p>
                    <i>Jini</i>
                    architecture uses events to warn about modifications within the system. Services can support messages sended in the form of events.
                </p>
            </div>
            <div class="subChapter">
                <h3>2.2 - Components layer</h3>
                <p>
                    <i>Jini</i>
                    architecture uses composants of three categories: infrastructure, programming model and services. Those categories constitute layer more or less low that specify the creation of services defined into 
                    <i>Jini</i>
                    network.
					Infrastructure layer consists of a set of basic components of 
                    <i>Jini</i>
                    network.
                </p>
                <h4>2.2.1 - Infrastructure</h4>
                <p>
                    Infrastructure layer correspond to the minimal core needed to establish a
                    <i>Jini</i>
                    network. It consists of services, essential to the working network.
                </p>
                <p>Can be found in this layer:</p>
                <p />
                <ul>
                    <li>The integration of RMI protocol with the Java security platform support in distributed environnment. It’s used for communication into the network.</li>
                    <li>
                        The Discovery/join protocol, from 
                        <i>Jini</i>
                        architecture, which allows services to discover and register with the lookup service.
                    </li>
                    <li> The lookup service is a kind of directory and deposit which enable newer services to register, for signal that they are available, and to transmit their interface to clients.</li>
                </ul>
                <h4>2.2.2 - Programming model</h4>
                <p>
                    The programming model layer is closely related to the infrastructure layer. Together, they constitute the fundation of the service creation. 
					The programming model layer allows to define all interfaces related to services, and to move them in the 
                    <i>Jini</i>
                    network.
                </p>
                <p>It is composed to three types of interfaces :</p>
                <p />
                <ul>
                    <li>Leasing interfaces, which allow user to allocate service resources for a renewable period of time.</li>
                    <li>Events interfaces, which allow services to send and receive notifications and to know how to treat them.</li>
                    <li>Transactions interfaces, in order to maintain a coherent system by protecting the system from erroneous changes.</li>
                </ul>
                <h4>2.2.3 - Services</h4>
                <p>Services are the third layer of the architecture, and are based on the other two to run. 
					Using the infrastructure layer and the programming model, a service can, for example, use discover/join protocol in order to find a lookup service, use events to register and notice its availability. Then, it offers its resources to the client with the leasing. 
					Services appear like objects with Java-writed interface which define operation that can be made on them.
				</p>
                <p>Services can be, for example:</p>
                <p />
                <ul>
                    <li>The printing, display services, and so on.</li>
                    <li>
                        The
                        <i>JavaSpace</i>
                        , which allows to communicate and to store objects in groups.
                    </li>
                    <li>
                        The
                        <i>Transaction manager</i>
                        , which manages transactions within the network.
                    </li>
                    <ul />
                </ul>
            </div>
            <div class="subChapter">
                <h3>
                    2.3 - Operating of a Jini Network
                    <i>Jini</i>
                </h3>
                <p>
                    The charts belows show the progress of the two main services: discovery/join protocol and lookup service. They will help you to better understand the architecture of 
                    <i>Jini</i>
                    system.
                    <br />
                    <br />
                    Discovery Chart
                    <br />
                    <br />
                    <img src="./images/jini_discovery.jpg" />
                    <br />
                </p>
                <p>
                    A service, which had just been add to 
                    <i>Jini</i>
                    network, send a multicast request, seeking to lookup services in order to register.
                    <br />
                    <br />
                    Join Chart
                    <br />
                    <br />
                    <img src="./images/jini_join.jpg" />
                    <br />
                </p>
                <p>
                    Once the lookup service founded, the service transfers a service object, containing its interfaces and attributes for use it. A copy of those objects is in the lookup service.
                    <br />
                    <br />
                    Lookup Chart
                    <br />
                    <br />
                    <img src="./images/jini_lookup.jpg" />
                    <br />
                </p>
                <p>
                    A client, who wants to use the service, identifies on the lookup service the service that goes with it and download locally interfaces of the service.
                    <br />
                    <br />
                    Use Chart
                    <br />
                    <br />
                    <img src="./images/jini_utilisation.jpg" />
                    <br />
                </p>
                <p>Once the client has repered and downloaded interfaces of the service, it can talk and execute methods proposed by the service.</p>
            </div>
        </div>
        <div class="chapter">
            <h2>
                3 -
                <i>Jini</i>
                Technology Starter Kit
            </h2>
            <p>
                The
                <i>Jini</i>
                technology federated has an active community that is working to make progress the differents tools related to its application. The 
                <i>Jini</i>
                community published resources on:
                <a href="http://www.jini.org">http://www.jini.org</a>
                and especially its flagship product the
                <i>Jini(TM) Technology Starter Kit</i>
                .
            </p>
            <div class="subChapter">
                <h3>3.1 - Installation</h3>
                <p>
                    The
                    <i>Jini(TM) Technology Starter Kit</i>
                    contains an implementation of the
                    <i>Jini</i>
                    architecture from 
                    <i>Sun Microsystems</i>
                    . Currently, writing this article, the version 2.1 is downloadable at
                    <a href="http://starterkit.Jini.org/downloads/index.html">http://starterkit.Jini.org/downloads/index.html</a>
                    . It’s an installer that installs various libraries useful for the development, differents services already implemented with their sources, as well as the javadocs of the
                    <i>Jini</i>
                    architecture and libraries of Starter Kit. The
                    <i>Jini</i>
                    community brings, with the Starter Kit, implementations of many useful services to create a 
                    <i>Jini</i>
                    system, without being re-developed. Developers can concentrate on services they want to add.
                </p>
            </div>
            <div class="subChapter">
                <h3>3.2 - Supplied components</h3>
                <p>
                    The starter kit provides an implementation of principal services, necessary for the operation of the network, and enables novices discovering 
                    <i>Jini</i>
                    technology to concentrate on services development.
                </p>
                <p>In the version 2.1, used in this article, there is:</p>
                <p />
                <ul>
                    <li>
                        « reggie », an 
                        <i>Lookup Service</i>
						implementation
                    </li>
                    <li>
                        « mahalo », the implementation of
                        <i>Transaction manager Service</i>
                    </li>
                    <li>
                        « norm », the implementation of
                        <i>Lease Renewal Service</i>
                    </li>
                    <li>
                        « mercury », an 
                        <i>Event Mailbox Service</i>
						implementation
                    </li>
                    <li>
                        « fiddler », the implementation of
                        <i>Lookup Discovery Service</i>
                    </li>
                    <li>
                        « outrigger », the implementation of
                        <i>JavaSpaces(TM) Service</i>
                    </li>
                </ul>
                <p>The version 2.1 of the Starter Kit provides also tools belonging to the infrasructure and programming model layer, increasing stability and functionality of the network.</p>
                <h4>3.2.1 - Programming model</h4>
                <p>The new components of the programming model layer are:</p>
                <p />
                <ul>
                    <li>
                        Configuration : developpers of
                        <i>Jini</i>
                        community have developed this API for facilitate applications setting up. An application is easier to deploy and to develop when parameters are exported in a configuration file.
                    </li>
                    <li>Exporter : Exporter API provides an abstraction to export distants objects. It lets to change the properties of export without having to modify the sourec code of the service.</li>
                    <li>
                        <i>ProxyPreparer</i>
                        : 
                        <i>ProxyPreparer</i>
                        is an API improving security, by allowing clients to check integrity of the source which sends the object.
                    </li>
                </ul>
                <h4>3.2.2 - Infrastructure</h4>
                <p>Developers’ contributions bring new components for infrastructure layer, oriented to impove security and integrity of services.</p>
                <p>The new components of the infrastructure layer include:</p>
                <p />
                <ul>
                    <li>Components for security</li>
                    <li>Components to manage invocation constraints.</li>
                    <li>
                        <i>Jini Extensible Remote Invocation</i>
                        (
                        <i>Jini ERI</i>
                        ), an implementation of RMI, which supports the transport of objects supporting security tools.
                    </li>
                </ul>
            </div>
        </div>
        <div class="chapter">
            <h2>4 - Conclusion</h2>
            <p>
                This article is an overview of
                <i>Jini</i>
                , a technology for creating a network, easy to administer, progressive and distributed. This technology, developed by 
                <i>Sun</i>
                impoved by a developers community, is quite young but has great potential because it responds to the need of service-oriented system, where everyone has access to the service he needs, where and when he wants.
            </p>
            <p>
                With the development of Internet and new technologies,
                <i>Jini</i>
                systems take all its importance, particulary for home automation and “house of the future” domain.
            </p>
        </div>
    </body>
</html>

